package frsf.cidisi.exercise.laberinto.situationCalculus;

import frsf.cidisi.faia.agent.Action;
import frsf.cidisi.faia.agent.ActionFactory;

import frsf.cidisi.exercise.laberinto.situationCalculus.actions.*;



public class AgenteLaberintoActionFactory extends ActionFactory {

    private static AgenteLaberintoActionFactory instance;

    private AgenteLaberintoActionFactory() {
    }

    public static AgenteLaberintoActionFactory getInstance() {
        if (instance == null) {
            instance = new AgenteLaberintoActionFactory();
        }
        return instance;
    }

    @Override
    protected String endActionString() {
        return "noAction";
    }

   
     @Override
   	 protected Action stringToAction(String stringAction) {
        Action actionObject = null;
        
		if (stringAction.equals("girarDer")) {
	            actionObject = new GirarDerecha();
	        } else if (stringAction.equals("girarIzq")) {
	            actionObject = new GirarIzquierda();
	        } else if (stringAction.equals("avanzar")) {
	            actionObject = new Avanzar();
	        } else if (stringAction.equals("tomarLlave")) {
	            actionObject = new TomarLlave();
	        }
        
        return actionObject;
    }
}
